package cn.edu.sdjzu.xg.kcsj.domain;

import cn.edu.sdjzu.xg.kcsj.domain.authority.Actor;
import lombok.*;

import java.io.Serializable;

@Setter
@Getter
@ToString
@NoArgsConstructor


public final class Teacher extends Actor implements Comparable<Teacher>, Serializable {

    private Integer id;
    private String name;
    private String no;
    private String sex;
    private int age;
    private String title;

    public Teacher (Integer id,String name,String no,String sex,int age,String title) {
        this.id = id;
        this.name = name;
        this.no = no;
        this.sex = sex;
        this.age = age;
        this.title = title;
    }
    public Teacher (String name,String no,String sex,int age,String title) {
        this.name = name;
        this.no = no;
        this.sex = sex;
        this.age = age;
        this.title = title;
    }

    @Override
    public int compareTo(Teacher other) {
        // no为排序依据
        return this.no.compareTo(other.no);
    }
}
